using System;
using System.Collections.Generic;
using System.Linq;

namespace Green.Utility
{
    public class ComputeExpressionKeyEqualityComparer : IEqualityComparer<ComputeExpressionKey>
    {
        #region IEqualityComparer<ComputeExpressionKey> 成员

        public bool Equals(ComputeExpressionKey x, ComputeExpressionKey y)
        {
            return x.Expression == y.Expression && x.ModelType == y.ModelType && x.ResultType == y.ResultType;
        }

        public int GetHashCode(ComputeExpressionKey obj)
        {
            return obj.Expression.GetHashCode() ^ obj.ModelType.GetHashCode() ^ obj.ResultType.GetHashCode();

        #endregion
        }

    }
}
